home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ACORNET / OLD-VERSIONS / UPG017-0 / !AnUpg019_!SLIPdial_Docs_DemScript < prev    next >
Encoding:
Text File  |  1995-07-11  |  21.2 KB  |  667 lines

  1.  
  2. ScriptHelp
  3. ==========
  4.  
  5. This help file applies to R.Orwin/A.P. Fitch slipdial script.
  6. Script file Revision 1.6
  7.  
  8. Contents
  9. --------
  10.  
  11. 1.0 Introduction
  12.  
  13. 2.0 Using the script
  14.  
  15. 3.0 Script Requirements
  16.  3.1 Modem Driver
  17.  3.2 Setting up your modem to transmit status messages
  18.  3.3 Making sure that TTFN etc have been "seen".
  19.  
  20. 4.0 Customizing the script
  21.  4.1 The contents of the configuration file, !slipdial.scripts.demconfg
  22.  4.2 To change the default dialler to Mercury.
  23.   4.2.1 To remove your Mercury PIN from a local number.
  24.  4.3 To Alter the Dialler Menu.
  25.  4.4 To Alter the List of Numbers
  26.  4.5 To Alter the Number of Retries.
  27.  4.6 To Change the Local Dialler Icon Number. 
  28.  
  29. 5.0 Some Frequently Asked Questions.
  30.  
  31. 6.0 Conclusions and Acknowledgements. 
  32.  
  33. 1.0 Introduction
  34. ================
  35.  
  36. This script was originally written by Rob Orwin.  I initially modified 
  37. to make it more readable, and also to learn the script language
  38. myself. Recently it has been customised to work with TTFN/Newsbase,
  39. and included in Dr. Alan Hassey's Internet Starter Pack for Acorn 
  40. Computers.
  41.  
  42. Changes made to version 1.5/1.6
  43. -------------------------------
  44.  
  45. The script has been largely re-written, mainly so that all
  46. configuration information is held in the file
  47. !slipdial.scripts.demconfg. So that new and old configuration files
  48. are not confused, the the configuration file is now called "demconfg"
  49. instead of "demonconfg".
  50.  
  51. The main advantage of these changes are 
  52.  
  53.    1) the script should start up faster
  54.    2) changes may be made to the phone numbers dialled without editing
  55.       the script (i.e. only demconfg has to be edited).
  56.       
  57. Two additional configuration options have been added 
  58.  
  59.    1) it is now possible to specify a number in the configuration file 
  60.       which will NOT have the mercury prefix added 
  61.    2) it is now possible to specify the default "local" number as a
  62.       completely separate item.  In the past, it was assumed that the
  63.       "local" number would not require a mercury prefix - this is not
  64.       always the case, so they have been made separate.
  65.  
  66. Finally, error reporting has been improved
  67.  
  68.    1) if the call fails due to not receiving the login, password, or 
  69.       protocol prompts, you will be told what caused the failure.
  70.  
  71.       
  72. 2.0 Using the script
  73. ====================
  74.  
  75. The script is placed in the !SlipDial.scripts directory.  You can
  76. either load it by dragging it and dropping it on the SlipDial icon bar
  77. icon, or you can set SlipDial up to run the script automatically.  You
  78. should read the SlipDial documentation file !SlipDial.!Help to
  79. understand this.
  80.  
  81. For the default setup with the starter pack, the scriptfile should be
  82. named
  83.  
  84. !SlipDial.scripts.demon
  85.  
  86. When the script is run for the first time, it asks for setup
  87. information and stores it in a configuration file.  This version of
  88. the script has  more information stored in the configuration file, and
  89. so may ask you for the information again, even if you have previously
  90. stored it.
  91.  
  92. There are a number of requirements for getting the script to work in
  93. the best way.  In particular, you need to
  94.  
  95. 1) make sure you are using the correct modem driver file
  96. 2) set up your modem to return certain messages
  97. 3) make sure that TTFN, NewsBase, and TCPIP have been "seen" by the filer
  98.  
  99. There are also a number of ways you can customise your setup.  The
  100. simplest ones are 
  101.  
  102. 1)  to change the default dialler to Mercury
  103. 2)  to alter the entries that appear on the menu for dialling
  104. 3)  to alter the default entries when dialling a list of phone numbers
  105. 4)  to alter the number of times SlipDial retries each number if the
  106.     line is busy 
  107. 5)  to change the local number 
  108.  
  109.  
  110. >From version 1.5 onwards of the script, these changes may be made by
  111. editing the file !slipdial.scripts.demconfg (known hereinafter as the
  112. "configuration file").
  113.  
  114. Note that to make changes to the script or the configuration, you
  115. simply have  to use a normal text editor, e.g. Edit.
  116.  
  117. With !SlipDial, there is a file called !SlipDial.scripts.DemonSpr,
  118. which  contains sprite definitions.  You must make sure you have the
  119. most up-to-date version of these sprites. If the file contains three
  120. sprites, you are ok - if it only contains 2, you should update it to
  121. the latest one by downloading it from demon ftp.
  122.  
  123. 3.0 Script Requirements
  124. =======================
  125.  
  126. 3.1 Modem Driver
  127. ----------------
  128.  
  129. The modem drivers are stored in the directory !SlipDial.Drivers. 
  130. There are examples for a number of modems.  The driver is  set when
  131. the configuration file is first stored (normally when you first run
  132. the script).  Simply answer the question wih the driver you wish to
  133. use.
  134.  
  135. 3.2 Setting up your modem to transmit status messages
  136. -----------------------------------------------------
  137.  
  138. If you run the script, and it appears to hangup after the call has got
  139. through but before TCPIP has started; or it doesn't recognise that the
  140. line is busy; then you need to make sure that the modem is returning
  141. messages indicating its (the modem's) status.  These messages are text
  142. strings, and their meaning is defined in the  driver file.  For
  143. instance, with the US Robotics Sportster modem, you need to send the
  144. setup string "X4" to enable all messages.
  145.  
  146. This means that when the modem detects the line is busy, it will
  147. return the string "BUSY".  You can tell the script to expect the
  148. string "BUSY" to indicate engaged by putting it in the modem driver
  149. file and assigning it to the script variable $busy. When dialling the
  150. modem looks for the string to see if it is equal to the contents of
  151. $busy and uses this to detect engaged lines.
  152.  
  153. The various possible strings, and their setups for a USR modem are
  154. shown in the example driver file below
  155.  
  156. set $init "ATB0E1F1M1Q0S7=30V1X4 AT&A2&B1&C1&D2&H1&I0 AT&K3&M4&N0&R2&S0&Y1"
  157. set $busy "BUSY"
  158. set $conn "CONNECT"
  159. set $nocarr "NO CARRIER"
  160. set $nodial "NO DIAL TONE"
  161.  
  162. The $init string is sent to the modem to set it up.  You will notice that
  163. the example above has X4 enabled.     
  164.  
  165. If you have a modem which returns different strings, you would have to 
  166. create your own modem driver.  For instance, if your modem returned
  167. "ENGAGED", you would have to modify the driver file to contain
  168.  
  169. set $busy "ENGAGED"
  170.  
  171. 3.3 Making sure that TTFN etc have been "seen".
  172. -----------------------------------------------
  173.  
  174. The script runs TTFN, Newsbase, and TCPIP automatically.  To do this,
  175. it needs to know where they are.  It can find them if you have opened
  176. a filer window with these programmes visible.  The  simplest way to
  177. ensure that they have been seen is to put all the internet related
  178. programmes in one directory.  Then when you open the directory in
  179. order to double-click SlipDial, you  know that all the other
  180. programmes have been seen.
  181.  
  182. 4.0 Customizing the Script
  183. ==========================
  184.  
  185. 4.1 The contents of the configuration file, !slipdial.scripts.demconfg
  186. ----------------------------------------------------------------------
  187.  
  188. A typical configuration file looks like this.
  189.  
  190. SP_DualPC               <-- the required block driver
  191. 0                       <-- port number
  192. 57600                   <-- computer to modem speed
  193. cycle                   <-- your host name
  194. password                <-- your password
  195. USR                     <-- the modem driver
  196. bt                      <-- telephone service provider 
  197. 131,999999999           <-- your mercury pin
  198. IsleOfWight             <-- menu entry 1 title
  199. 01983523306             <-- menu entry 1 phone number
  200. Reading                 <-- menu entry 2 title
  201. 01734284848             <-- menu entry 2 phone number
  202. London                  <-- menu entry 3 title
  203. 01813384848             <-- menu entry 3 phone number
  204. 01983523306             <-- the local (default) number
  205. 01983523306             <-- a number which should NOT be prefixed 
  206.                             with a mercury pin 
  207.  
  208. Normally this would be set up by running !DemConfg, if you use
  209. the Demon internet starter pack. However if you need to change
  210. something later, here is a description of what each option means.
  211.  
  212. 4.1.1 Block Driver
  213. ------------------
  214.  
  215. This is the block driver name. It should be set to match with your computer, and the type of modem lead you have attached. The available block drivers are 
  216.  
  217. Telnet
  218. SP_DualPC
  219. SP_Dual
  220. PipeB
  221. PipeA
  222. InternalPC
  223. Internal2
  224. Internal
  225. II_Dual
  226. Econet
  227.  
  228. The most important thing is to use the correct driver depending on
  229. whether you have a PC or Acorn wired serial lead. With a PC wired
  230. lead, you should use a driver ending in PC, e.g. InternalPC for an
  231. A5000. With an Acorn wired lead, you should use a driver which does
  232. NOT end in PC, e.g. Internal for an A5000. 
  233.  
  234. 4.1.2 Port number
  235. -----------------
  236.  
  237. This is only required if you have a serial interface with more than
  238. one serial port, for instance The Serial Port Dual Interface
  239. (SP_Dual), or an Intelligent Interfaces serial interface (II_Dual).
  240. You should set the value to the port number you which to use. For
  241. single port systems, the number should be 0.
  242.  
  243. 4.1.3 Computer to Modem speed
  244. -----------------------------
  245.  
  246. This should be set to as high a value as possible, depending on the
  247. serial port hardware you have. The value shown is suitable for
  248. SP_Dual.
  249.  
  250. 4.1.4 Host name.
  251. ----------------
  252.  
  253. Set this to your host name.  For my address (alan@cycle.demon.co.uk),
  254. the host name is cycle.
  255.  
  256. 4.1.5 Password
  257. --------------
  258.  
  259. Set this to your Demon password.
  260.  
  261. 4.1.6 Modem driver
  262. ------------------
  263.  
  264. Set this to be suitable for your modem. At the time of writing, the
  265. following Modem Drivers are available 
  266.  
  267. ATZ          = ATZ (should initialise anything!)
  268. USR          = Miracom or Sportster 14k4
  269. Courier      = Simple driver which works with most USR Courier modems
  270. Courier28k   = Driver for USR Courier V34 28k8 modems
  271. Supra14k4    = SupraFax14k4 driver
  272. Zoom14k4     = Zoom 14k4 driver
  273.  
  274. Check inside the directory !slipdial.drivers for latest information.
  275.  
  276. 4.1.7 Telephone Service Provider
  277. --------------------------------
  278.  
  279. This should be set to 'bt' or 'mercury'. It may be set from a menu on
  280. the icon bar when slipdial is running.
  281.  
  282. 4.1.8 Mercury Pin
  283. -----------------
  284.  
  285. This should be set to the access code for mercury. For instance to use
  286. the Mercury 131 service, you should dial 131, pause, and then send
  287. your pin. With a Hayes compatible modem you may pause by putting a
  288. comma ',' in the dial string, e.g.
  289.  
  290. 131,999999999
  291.  
  292. The comma causes a 2 second pause. 
  293.  
  294. 4.1.9 Menu entries
  295. ------------------
  296.  
  297. The next six lines allow three menu entries to be setup for dialling
  298. to Demon Points of Presence (PoPs). At the time of writing, the
  299. following PoPs were available
  300.  
  301. Birmingham
  302. 01212754848
  303. Bradford
  304. 01274755066
  305. Bristol
  306. 01179814848
  307. Cambridge
  308. 01223576010
  309. Cardiff
  310. 01222274848
  311. Coventry
  312. 01203284848
  313. Edinburgh
  314. 01315528883
  315. Gloucester
  316. 01452354848
  317. Hull
  318. 01482495580
  319. IsleOfWight
  320. 01983523306
  321. Leeds
  322. 01132984848
  323. Leicester
  324. 01162904848
  325. Liverpool
  326. 01512104848
  327. London
  328. 01813384848
  329. Luton
  330. 01582644848
  331. Manchester
  332. 01613854848
  333. Newcastle
  334. 01912474848
  335. Nottingham
  336. 01159544848
  337. Preston
  338. 01772484848
  339. Reading
  340. 01734284848
  341. Saffron
  342. 01799506010
  343. Sheffield
  344. 01142384848
  345. Sunderland
  346. 01915225005
  347. Wolverhampton
  348. 01902464848       
  349.  
  350. You must have three PoPs defined in the configuration file. These
  351. should be in order of which one is closest to you. The three together
  352. are used if you select the "list" menu option for dialling (see
  353. below).
  354.  
  355. Please note: the text title of the PoP may be anything you like, but
  356. it must be less than 12 characters long!
  357.  
  358. 4.1.10 Local (preferred) number
  359. -------------------------------
  360.  
  361. This entry should be set to the number of your nearest (and hence
  362. cheapest) PoP.
  363.  
  364. 4.1.11 No Mercury Pin number
  365. ----------------------------
  366.  
  367. This should be set to the number to which you DON'T want to have your
  368. mercury pin added. If you want to have your Mercury pin added to ALL
  369. numbers, set this to 0.
  370.  
  371. 4.2 To change the default dialler to mercury.
  372. ---------------------------------------------
  373.  
  374. Press the "menu" (middle) mouse button over the BT/Mercury icon.  Select
  375. the service provider you wish to use.  The icon will change to show 
  376. a BT or Mercury logo depending on which one you selected.  Now press
  377. menu over the same icon, and select the option "Save Default".
  378.  
  379. Your selected default (mercury or bt) is stored in the configuration
  380. file (!SlipDial.Scripts.demconfg).
  381.  
  382. 4.2.1 To remove your Mercury PIN from a local number.
  383. -----------------------------------------------------
  384.  
  385. If you have a Mercury PIN which is only required for long distance
  386. calls, you may have to remove the PIN from your local number.
  387.  
  388. To change this, you must modify the configuration file. You should
  389. enter the number to which you DO NOT want your mercury pin added as
  390. the last line of the file (see example above). If you DO want your
  391. mercury pin prefixed on ALL numbers, set the last line of the file to
  392. 0. 
  393.  
  394. Note: if you select bt as your telephone provider, this entry is
  395. ignored and you do not need to touch it at all.
  396.  
  397. 4.3 To Alter the Dialler Menu.
  398. ------------------------------
  399.  
  400. The dialler menu has a selection of three 'phone numbers from the
  401. available numbers at the time the script was written. You may change
  402. this selection by editing the configuration file,
  403. !slipdial.scripts.demconfg. See section 4.1.9 above. For instance, you
  404. can change the file to 
  405.  
  406. SP_DualPC
  407. 0
  408. 57600
  409. cycle
  410. password
  411. USR
  412. mercury
  413. 131,999999999
  414. London
  415. 01813384848
  416. Luton
  417. 01582644848
  418. Manchester
  419. 01613854848
  420. 01813384848
  421. 0
  422.  
  423. to make London, Luton, and Manchester options on the dialler menu.
  424. Setting 0 in the last line means that the mercury pin will be used on
  425. all numbers. London has been set as the preferred number (second from
  426. last line). The "List" option will dial London, then Luton, then
  427. Manchester in that order.
  428.  
  429.  
  430. 4.4 To Alter the List of Numbers
  431. --------------------------------
  432.  
  433. The script has a dialler menu option "List" which dials a sequence of
  434. phone numbers. This dials your three specified 'phone numbers in
  435. sequence. The order of dialling is set by the order the numbers appear
  436. in the !slipdial.scripts.demconfg file.
  437.  
  438.  
  439. 4.5 To Alter the Number of Retries.
  440. -----------------------------------
  441.  
  442. For each phone number, there is a subroutine.  These subroutines are
  443. called dial1, dial2, dial3, diallocal, and List. For instance for your
  444. first number, edit the file !slipdial.scripts.demon and search for the
  445. string ":dial1".
  446.  
  447. You will find the following
  448.  
  449. # dial number 1 from the configuration file
  450. :dial1
  451. set nRetries 50
  452. set phonenum %phonenum1
  453. if (?ne %phonenum1 %nopredialnum) set phonenum %predial%phonenum1
  454. goto dodial             
  455.  
  456.  
  457. If you want to alter the number of retries (i.e. how many times 
  458. SlipDial will attempt to dial a number and find it is engaged
  459. before giving up), change the line
  460.  
  461. set nRetries 50
  462.  
  463. For instance, suppose you want to retry 100 times.  Change this line
  464. to 
  465.  
  466. set nRetries 100
  467.  
  468. Note: there is a separate number of retries for each phone number in 
  469. the script, and also for the "List" list of numbers.  To change the
  470. number of retries for the List, search for ":List".
  471.  
  472. Note that in the case of the list, the number of retries defined will
  473. be the same for each number in the list.  So if you dial Sheffield, 
  474. Leeds, and London in the list, and set nRetries to 5 in the :List
  475. subroutine, SlipDial will
  476.  
  477. a) dial Sheffield 5 times maximum
  478. b) if Sheffield was engaged, dial Leeds 5 times maximum
  479. c) if Leeds was engaged, dial London 5 times maximum.
  480. d) give up in disgust
  481.  
  482. The default setup is that all menu items are tried up to 50 times,
  483. except for the list where each number is tried 5 times.  The idea
  484. behind this is that you would only use the List if you were trying to
  485. get through quickly.
  486.  
  487.  
  488. 4.6 To Change the Local Dialler Icon Number.
  489. --------------------------------------------
  490.  
  491. This version of the script allow your favourite number to be attached
  492. to an icon on the icon bar. This allows you to dial that number
  493. without having to use the menu item.  However to be useful you must
  494.  
  495. a) make sure you have the correct version of the file
  496. !SlipDial.scripts.DemonSpr
  497.  
  498. b) define your preferred number in the configuration file.
  499.  
  500. For a), you should be ok if you download the up-to-date version of the
  501. script file, as contained in the Acorn Starter-Pack.  If you have a
  502. demonspr file with only two sprites in it, you have got the wrong
  503. version - you can overcome this temporarily by creating a dummy sprite
  504. in the DemonSpr file called loc (short for local).
  505.  
  506. For b) you need to change the second from last line in the
  507. configuration file, !slipdial.scripts.demconfg, to your preferred
  508. number. Note that you don't have to include your mercury pin in front
  509. of the number if you are on mercury - this is automatically added for
  510. you.
  511.  
  512.  
  513. 5.0 Some Frequently Asked Questions
  514. ===================================
  515.  
  516. 1) When I log on, SlipDial appears to miss the "l" off "login" - is
  517. this a bug?
  518.  
  519. No - it is recommended by Demon that during login, diallers should
  520. wait for the strings  "ogin:", "otocol:" etc.  See the section "The
  521. Login Sequence" in the file 
  522.  
  523.          ftp.demon.co.uk:/pub/doc/Demon.txt
  524.          
  525. 2) When I start up SlipDial it exits immediately with an error.  What
  526. can I do?
  527.  
  528. Firstly, this is most likely to be due to the DemonSpr file.  You need
  529. the latest version of this which contains three sprites.  See below
  530. (how to get DemonSpr when !SlipDial isn't working).
  531.  
  532. However it might be some other problem. The best way of finding out is
  533. to enable the script log.  To do this, edit the script file, and
  534. search for the line
  535.  
  536. #trace "SlipDial:logoutput"
  537.  
  538. and change it to 
  539.  
  540. trace "SlipDial:logoutput"
  541.  
  542. i.e. delete the #.  This will cause SlipDial to write debugging
  543. information to the file !SlipDial.Scripts.logoutput
  544.  
  545. You can use the information obtained to try and find out what is going
  546. on.
  547.  
  548. 3) SlipDial starts up, dials, my modem gets through, but then the
  549. call finishes immediately?  
  550.  
  551. The SlipDial script is set up to watch the DCD (data carrier detect)
  552. line from your modem. If this line remains low, SlipDial will think
  553. the call has finished straight away.  You should check
  554.  
  555. a) your modem setup
  556. b) your cable
  557. c) your serial interface driver
  558.  
  559. Be especially careful to match lead and serial driver. The lead can be
  560. either Archimedes wiring or PC wiring - they are not compatible!  Also
  561. the BlockDriver must be set to match the interface port and the cable
  562. wiring.  The BlockDriver loaded by the SlipDial script is defined in
  563. the file !SlipDial.Scripts.demconfg, which is initialised the first
  564. time your run the script.  Here are some examples
  565.  
  566. You have a PC wired cable, with an internal port - first two lines of
  567. demconfg are
  568.  
  569. InternalPC
  570. 0
  571.  
  572. You have an Arc cable, with an internal port - should lead to 
  573.  
  574. Internal
  575. 0
  576.  
  577. You have a Serial port Dual interface card, you have connected the
  578. cable to port 1, you have a PC wired lead - should lead to 
  579.  
  580. SP_DualPC
  581. 1
  582.  
  583. 4) I've updated the script, and now it doesn't work because I haven't
  584. got the latest DemonSpr file - how can I log on if the script doesn't
  585. work?
  586.  
  587. Good question. The simplest answer is to use Paint to create an extra
  588. sprite in the DemonSpr file.  For instance, copy one of the existing
  589. sprites (such as hgon) and rename the copy to loc.  It might be a good
  590. idea to change its colour so that you don't mix it up with hgon.  Then
  591. log on to demon, and download the latest version of DemonSpr.
  592.  
  593. You can of course create your own sprite, representative of local
  594. traditions and/or landmarks.
  595.  
  596. 5) Last time I logged into Demon I changed my password, and now
  597. SlipDial doesn't work - what should I do?
  598.  
  599. You have to edit the file !SlipDial.scripts.demconfg.  The fifth line
  600. of this should be changed to your new password (which is case sensitive
  601. I believe).
  602.  
  603. 6) I've modified the script, and nothing seems to have changed.
  604.  
  605. You must make sure the new script has been loaded in.  Quit SlipDial
  606. and  load it again to ensure this.
  607.  
  608. 7) The script never calculates the newsrate - why? 
  609.  
  610. This feature has been removed, as the rate of new download is now 
  611. computed by TCPIP version 2.04.
  612.  
  613. 8) I've just upgraded to the latest version of the script and slipdial
  614. asked me to re-enter my configuration - why?
  615.  
  616. The latest version of the script stores more information in the config
  617. file - so to ensure the data is correct, it asks you to enter it all again.
  618.  
  619. 9) I want to know how fast a connection my modem has made; how can I do
  620.    this?
  621.    
  622. Once the script has loaded, click adjust on the slipdial 'telephone'
  623. icon: this will open the control window. When you dial the number, you
  624. will see a string in the control window with the speed and connection
  625. method (assuming you have messages set up correctly - see section 3.2
  626. above). With my USR Sportster, I get the message 
  627.  
  628. CONNECT 14400/ARQ/V32/V42BIS
  629.  
  630. or something like that! 
  631.  
  632.  
  633. 6.0 Conclusion and Acknowledgements.
  634. ====================================
  635.  
  636. I hope this helps if you want to modify the script.
  637.  
  638. I should like to acknowledge Robert Orwin for writing the original
  639. script, and of course thank Graham Allan for writing SlipDial in  the
  640. first place.  Also thanks to Mike James for improving the support for
  641. Mercury numbers. and introducing the Local icon, and to Doug Macready
  642. for improving the ease of configuration.
  643.  
  644. Alan Fitch
  645. alan@cycle.demon.co.uk
  646.  
  647. $Log:    ScriptHelp $
  648. # Revision 1.6  95/06/25  09:54:32  root
  649. # removed references to DSR/CTR checking to match demon v1.6
  650. # Revision 1.5  95/05/28  11:09:53  root
  651. # Added more detail on Mercury access, after testing by Mike James.
  652. # Revision 1.4  95/05/25  17:38:23  root
  653. # 1) modified to match demon script v1.5
  654. # Revision 1.3  95/05/08  01:25:28  root
  655. # To match v1.4 of script
  656. # Revision 1.2  95/05/08  01:13:42  root
  657. # updated to match version 1.3 of the 'demon' script
  658. # Revision 1.1  95/05/07  23:20:07  root
  659. # Initial revision
  660. # ===============================================================
  661.  
  662.